Public Sub Test_getEndColumnNo()
    Dim result As Long
    result = UtilsWorksheet.getEndColumnNo(ThisWorkbook.ActiveSheet, 5)
    Debug.Print result
End Sub

Public Sub Test_getEndColumnStr()
    Dim result As String
    result = UtilsWorksheet.getEndColumnStr(ThisWorkbook.ActiveSheet, 5)
    Debug.Print result
End Sub

Public Sub Test_getEndRowNo()
    Dim result As Long
    
    result = UtilsWorksheet.getEndRowNo(ThisWorkbook.ActiveSheet, "E")
    Debug.Print result
    
    result = UtilsWorksheet.getEndRowNo(ThisWorkbook.ActiveSheet, 6)
    Debug.Print result
End Sub


Public Sub Test_getUsedRangeEndRowNo()
    Dim result As Long
    result = UtilsWorksheet.getUsedRangeEndRowNo(ThisWorkbook.ActiveSheet)
    Debug.Print result
End Sub

Public Sub Test_getUsedRangeEndColumnNo()
    Dim result As Integer
    result = UtilsWorksheet.getUsedRangeEndColumnNo(ThisWorkbook.ActiveSheet)
    Debug.Print result
End Sub

Public Sub Test_getUsedRangeEndColumnStr()
    Dim result As String
    result = UtilsWorksheet.getUsedRangeEndColumnStr(ThisWorkbook.ActiveSheet)
    Debug.Print result
End Sub

Public Sub Test_colStr2No()
    Dim colStr As String
    Dim result As Integer
    
    Debug.Print "---------case1---------"
    colStr = "A"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 1
    
    Debug.Print "---------case2---------"
    colStr = "Z"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 26
    
    Debug.Print "---------case3---------"
    colStr = "a"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 1
    
    Debug.Print "---------case4---------"
    colStr = "AA"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 27

    Debug.Print "---------case5---------"
    colStr = "AZ"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 52
    
    Debug.Print "---------case6---------"
    colStr = "AAA"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 703
        
    Debug.Print "---------case7---------"
    colStr = "ZZ"
    result = UtilsWorksheet.colStr2No(colStr)
    Debug.Print result = 702
End Sub

Private Sub Test_colNo2Str()
    ' A = 1
    ' AA = 26 + 1 = 27
    ' AZ = 26 + 26 = 52
    ' ZA = 26 * 26 + 1 = 677
    ' YZ = 26 * 25 + 26 = 676
    ' ZZ = 26 * 26 + 26 = 702
    ' ZY = 26 * 26 + 25 = 701
    ' AAA = 703
    Debug.Print UtilsWorksheet.colNo2Str(0)
    Debug.Print UtilsWorksheet.colNo2Str(1)
    Debug.Print UtilsWorksheet.colNo2Str(26)
    Debug.Print UtilsWorksheet.colNo2Str(27)
    Debug.Print UtilsWorksheet.colNo2Str(52)
    Debug.Print UtilsWorksheet.colNo2Str(677)
    Debug.Print UtilsWorksheet.colNo2Str(676)
    Debug.Print UtilsWorksheet.colNo2Str(702)
    Debug.Print UtilsWorksheet.colNo2Str(701)
    Debug.Print UtilsWorksheet.colNo2Str(703)
    
End Sub

Private Sub Test_setAllCellAsTextByName()
    'UtilsWorksheet.setAllCellAsTextByName ThisWorkbook, "SheetXXX"
    ThisWorkbook.Sheets("SheetXXX").Cells.NumberFormatLocal = "@"
    'ThisWorkbook.Sheets("SheetXXX").Cells.NumberFormatLocal = "@"
End Sub

Private Sub Test_getRangeCoordinate()
    Dim a As Collection
    Set a = UtilsWorksheet.getRangeCoordinate(Selection)
End Sub

Private Sub Test_getCoordinateByRangeStr()
    Dim a As Collection
    Set a = UtilsWorksheet.getCoordinateByRangeStr("A3:B20")
    
    Set a = UtilsWorksheet.getCoordinateByRangeStr("xxxx!$A$3:B$20")
End Sub

Private Sub Test_copyTableText()
    Dim s As String
    
    s = "col1" & vbTab & "col2" & vbCrLf & _
        "col3" & vbTab & "col4"
    
    UtilsWorksheet.copyTableText ThisWorkbook, "SheetXXX", s, "A2", "A:B"
    
End Sub


Private Sub test_rangeCutAndPaste()
    Dim src As Range
    Set src = ActiveWorkbook.Sheets("Sheet5").Range("c10:d11")
    Dim desc As Range
    Set desc = ActiveWorkbook.Sheets("Sheet10").Range("c1")
    UtilsWorksheet.rangeCutAndPaste src, desc
End Sub
